All Posts
News bits
Vercel、AI SDK 5をリリース
Vercel、AI SDK 5をリリース
Vercelは、TypeScript/JavaScript向けのオープンソースAIツールキットであるAI SDKのメジャーアップデート、バージョン5をリリース。今回のアップデートでは、フルスタックでのエンドツーエンドな型安全性を実現するチャット機能の再設計と、エージェントループを精密に制御するための新しいプリミティブの導入に焦点が当てられている。
- 再設計されたチャット機能: UIの状態を管理する
UIMessageと、モデルに送信するためのModelMessageを明確に分離し、チャット履歴の永続化を簡素化。また、任意の型安全なデータをストリーミングするData partsや、型安全なツール呼び出しなど、UI統合が全面的に刷新された。 - エージェントループ制御:
stopWhen: ツール呼び出しループを停止する条件(ステップ数や特定のツール呼び出しなど)を定義可能。prepareStep: ループの各ステップが実行される前に、使用するモデル、メッセージ、ツールなどを動的に調整できる。
- 音声生成と文字起こし: OpenAI、ElevenLabs、DeepGramなどのプロバイダに対応した、統一的なAPIによる音声生成(Text-to-Speech)と文字起こし(Speech-to-Text)の実験的サポートを追加。
- ツールの改善: 開発時に型が不明なツールを扱うための
dynamicTool、プロバイダ側で実行されるツール(OpenAIのWeb検索など)のネイティブサポート、ツール呼び出しのライフサイクルを詳細に制御するフック機能が追加された。 - グローバルプロバイダ:
'openai/gpt-4o'のようなモデルID文字列だけでモデルを指定可能になり、プロバイダの切り替えを簡素化。デフォルトではVercel AI Gatewayが使用される。
著者について
Hi there. I'm hrdtbs, a frontend expert and technical consultant. I started my career in the creative industry over 13 years ago, learning on the job as a 3DCG modeler and game engineer in the indie scene.
In 2015 I began working as a freelance web designer and engineer. I handled everything from design and development to operation and advertising, delivering comprehensive solutions for various clients.
In 2016 I joined Wemotion as CTO, where I built the engineering team from the ground up and led the development of core web and mobile applications for three years.
In 2019 I joined matsuri technologies as a Frontend Expert, and in 2020 I also began serving as a technical manager supporting streamers and content creators.
I'm so grateful to be working in this field, doing something that brings me so much joy. Thanks for stopping by.